package com.erpoa.entity;

import com.google.common.base.Objects;
import lombok.*;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.List;

/**
 * Created by wanqi on 2016/8/8.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Slf4j
@EqualsAndHashCode
public class MgUser implements Serializable {
	/**
	 * 名字
	 */
	private String sName;
	private String sPassword;
	/**
	 * 人员编号
	 */
	private String sCode;

	private List<Integer> userPerssion;
    private String version;

	public String getsName() {
		return sName;
	}

	public void setsName(String sName) {
		this.sName = sName;
	}

	public String getsPassword() {
		return sPassword;
	}

	public void setsPassword(String sPassword) {
		this.sPassword = sPassword;
	}

	public String getsCode() {
		return sCode;
	}

	public void setsCode(String sCode) {
		this.sCode = sCode;
	}

	public List<Integer> getUserPerssion() {
		return userPerssion;
	}

	public void setUserPerssion(List<Integer> userPerssion) {
		this.userPerssion = userPerssion;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		MgUser mgUser = (MgUser) o;
		return Objects.equal(sName, mgUser.sName) &&
				Objects.equal(sPassword, mgUser.sPassword) &&
				Objects.equal(sCode, mgUser.sCode) &&
				Objects.equal(userPerssion, mgUser.userPerssion);
	}

	@Override
	public int hashCode() {
		return Objects.hashCode(sName, sPassword, sCode, userPerssion);
	}
}
